-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glow image rendering support; move image/svg code to iced_graphics #1485
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ids1024
added a commit
to ids1024/iced
that referenced
this pull request
Oct 26, 2022
This shows `iced_glow` outperforming `iced_wgpu`. Probably not accurate, some something may be wrong in the rendering and timing here? It should also test with more primitivies. Tests pass when combined with iced-rs#1485 and iced-rs#1491.
ids1024
added a commit
to ids1024/iced
that referenced
this pull request
Oct 26, 2022
This shows `iced_glow` outperforming `iced_wgpu`. Probably not accurate, something may be wrong in the rendering and timing here? It should also test with more primitivies. Tests pass when combined with iced-rs#1485 and iced-rs#1491.
ids1024
changed the title
WIP glow image rendering support
Glow image rendering support; move image/svg code to iced_graphics
Nov 4, 2022
ids1024
force-pushed
the
glow-image
branch
2 times, most recently
from
November 4, 2022 01:55
9d0ed07
to
7ff4694
Compare
The `TextureStore` trait is implemented by the atlas, and can also be implemented in the glow renderer or in a software renderer. The API here may be improved in the future, but API stability is presumably not a huge issue since these types will only be used by renderer backends.
iced-rs#674 Uses image/svg support in `iced_graphics`. The is not currently using an atlas, and uses one texture/draw per image. This should be good enough for now; supporting images with glow is better than not supporting them, and if something else performs better, that improvement can be made without any change to the public API.
- Use `Size<u32>` were applicable. - Rename `TextureStore` to `image::Storage`. - Rename `TextureStoreEntry` to `image::storage::Entry`. - Wire up `viewport_dimensions` to `iced_glow` for `Svg`.
hecrj
approved these changes
Nov 5, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been a long-awaited feature! Thanks 🥳
We are not leveraging a texture atlas in iced_glow
, but this gets us one step closer!
I have made some changes here and there; check the latest commits! In any case, I think this is ready to go 🚢
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #674 and closes #1489.
This works, but duplicates code from
iced_wgpu
that should ideally be shared, and the cache never evicts.The next step here is to work on an API design to move some of the image loading and caching logic from the backend to
iced_graphics
(or elsewhere?).